<div class="row">
    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
        <div class="widget am-cf">
            <div class="widget-body  am-fr">
			  <form class="am-form tpl-form-line-form">
            	<div class="am-article-title am-text-center">查看盘点单</div>
                	<div class="am-cf">
                    	<div class="am-form-inline am-padding-bottom-sm">
                              <div class="am-form-group">
                                <label class="am-u-sm-12 am-form-label">单据编号：{{.m.Identifier}}</label>
                       	  </div>
                              <div class="am-form-group">
                                <label class="am-u-sm-12 am-form-label">总产品数：{{.m.ProductNumber}}</label>
                         	  </div>
                          <div class="am-form-group">
                                <label class="am-u-sm-12 am-form-label">经办人：{{.m.OperatorName}}</label>
                              </div>
                              <div class="am-form-group">
                              	<label class="am-u-sm-12 am-form-label">制单人：{{.m.CreatedBy}}</label>
                              </div>
                          <div class="am-form-group">
                                <label class="am-u-sm-12 am-form-label">制单时间：{{.m.CreatedDate}}</label>
                              </div>
						</div>
                    </div>
                    <div style="max-height:600px; overflow:auto;">
                	<table class="am-table am-table-bordered am-text-sm" id="no-input-border" style="margin-bottom:0;">
								<thead>
									<tr style="background-color:#E0E8FF;text-align:center;">
										<td>序号</td>
										<td width="20%">商品</td>
										<td>屈光度</td>
										<td>散光度</td>
										<td>型号</td>
                                        <td>颜色</td>
										<td>帐面数量</td>
										<td><span style="color:#03F">实盘数量</span></td>
										<td>盈亏数量</td>
										<td><span style="color:#03F">单价</span></td>
                                        <td><span style="color:#03F">盈亏金额</span></td>
                                        <td>库存金额</td>
									</tr>
								</thead>
								<tbody>
                                {{range $k,$v := .m.StocksData}}
									<tr>
										<td class="indexs"></td>
										<td width="20%">{{$v.ProductName}}</td>
										<td>{{$v.Diopter}}</td>
										<td>{{$v.Astigmatism}}</td>
										<td>{{$v.ModelNumber}}</td>
                                        <td>{{$v.ColourNumber}}</td>
										<td>{{$v.PaperNumber}}</td>
										<td><span style="color:#03F">{{$v.RealdiskNumber}}</span></td>
										<td>{{$v.ProfitLossNumber}}</td>
										<td><span style="color:#03F">￥{{$v.UnitPrice}}</span></td>
                                        <td><span style="color:#03F">￥{{$v.ProfitLossMoney}}</span></td>
                                        <td>￥{{$v.InventoryMoney}}</td>
									</tr>
                                 {{end}}
									<tr>
									  <td></td>
									  <td colspan="6"></td>
									  <td>总计</td>
									  <td>{{.m.TotalProfitLossNumber}}</td>
									  <td>&nbsp;</td>
									  <td>￥{{.m.TotalProfitLossMoney}}</td>
									  <td>￥{{.m.TotalInventoryMoney}}</td>
					  				</tr>
								</tbody>
					</table>
                  </div>  	
				</form>
            </div>
			<div class="am-u-sm-12 am-text-center">
				<a class="am-btn am-btn-secondary" href='{{ urlfor "StocksController.Prints" }}/{{.m.Id}}' target="_blank" />打印单据</a>&nbsp; 
                {{if eq .m.Auditing 0}}
                	<input class="am-btn am-btn-warning" type="button" value="通过审核" onclick="setAuditing(1);return false;" />&nbsp;
                    <input class="am-btn am-btn-danger" type="button" value="拒绝审核" onclick="setAuditing(2);return false;" />&nbsp;
                {{end}}   
                {{if eq .m.Auditing 1}}
                	<input class="am-btn am-btn-success" type="button" value="审核已通过" />&nbsp;
                {{end}}
                {{if eq .m.Auditing 2}}
                	<input class="am-btn" type="button" value="审核已拒绝" />&nbsp;
                {{end}}
				<input class="am-btn am-btn-default" type="button" onclick="location='{{ urlfor "StocksController.Records" }}';return false;" value="返回"/>
			</div>
        </div>
    </div>
</div>
